<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans  http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

  <!-- main configuration, loaded via factory bean -->
  <bean id="jdbcStoreProperties" 
    class="org.geoserver.jdbcstore.internal.JDBCResourceStorePropertiesFactoryBean">
      <constructor-arg ref="dataDirectoryResourceStore"/>
  </bean>

  <!-- data source, also loaded and configured via factory bean -->
  <bean id="jdbcStoreDataSource" class="org.geoserver.jdbcloader.DataSourceFactoryBean">
    <constructor-arg ref="jdbcStoreProperties" />
  </bean>
  
  <!-- cache -->
  <bean id="resourceCache" class="org.geoserver.jdbcstore.cache.DataDirectoryResourceCache">  
  </bean>
  
  <!-- resource store -->
  <bean id="resourceStoreImpl" class="org.geoserver.jdbcstore.JDBCResourceStoreFactoryBean">
    <constructor-arg ref="dataDirectoryResourceStore" />
    <constructor-arg ref="jdbcStoreDataSource" />
    <constructor-arg ref="jdbcStoreProperties" />
    <property name="cache" ref="resourceCache" />
    <property name="lockProvider" ref="lockProvider"/>
    <property name="resourceNotificationDispatcher" ref="resourceNotificationDispatcher"/>
  </bean>

</beans>
